


let reg13 = /^[GCDZTSPKXLY1-9]\d{1,4}$/


let s = 'sdfsdf'

interface o111 {
  name: string;
  age: number;
}


// 不建议一下写法， 鸿蒙开发不支持
let o1 : {
  name?: string;
  age: number;
}= {
  name:'sfsd',
  age:234
}





const enum zl {
  a = 'a',
  b = 'b'
}

let zimliang:zl = zl.a

// 不建议以下写法
let zimliang3: "a" | "b" = 'a'


let zimliang5:string | boolean = 'sfdsf'




// 直接在变量后边使用定义的类型
let func1: () => void = ()=>{}


// 使用接口定义函数类型
interface Ifunc2 {
  ():void
}

let func2:Ifunc2 = ()=>{}

// 定义函数别名(强烈推荐)
type func3Type = () => void

let func3:func3Type = ()=>{}


type zimliang56Type = string | boolean

let zimliang56:zimliang56Type = 'sfdsf'


interface IObj11 {
  id:string | number 
  name: string 
  update?: number | string | undefined
}


interface IObj12 {
  sex:number
}


type IObj1122  =  IObj11 | IObj12